﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ModelLayer;
using System.Data.EntityClient;

namespace CtrLayer
{
    public class CTRIngrediens
    {
        public OpskriftModelContainer db;

        

        public CTRIngrediens()
        {
           db = new OpskriftModelContainer();
            
        }

        public Ingredienser GetIngrediens(int id)
        {
           
          
               Ingredienser ingrediens = (from i in db.IngredienserSet
                                           where i.ingrediens_Id == id
                                           select i).SingleOrDefault();
            
            return ingrediens;
            
        }

        //public string getName()
        //{ 
            
        //}

    }
}
